package com.lmf.annotation.config;

import com.lmf.annotation.bean.Blue;
import com.lmf.annotation.bean.MyBeanDefinitionRegistryPostProcessor;
import com.lmf.annotation.bean.MyBeanFactoryPostProcessor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.FilterType;

/**
 * BeanFactoryPostProcessor的底层工作原理：配置类
 */
@Configuration
@ComponentScan(value = "com.lmf.annotation.bean",useDefaultFilters = false,includeFilters = {
        @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE,classes = {MyBeanFactoryPostProcessor.class, MyBeanDefinitionRegistryPostProcessor.class})})
public class MyConfigOfMyBeanFactoryPostProcessor {
    @Bean
    public Blue blue(){
        return new Blue();
    }
}
